;civ_pbem_setup.nsi
Name "Civ PBEM Uploader"
OutFile "CivPBEMSetup.exe"

InstallDir $PROGRAMFILES\CivPBEM

DirText "This will install the Civilization IV PBEM uploader for www.pbemtracker.com on your computer"


Section "Install"

SetShellVarContext all
SetOutPath $INSTDIR

File /r CivPBEMUpload

CreateDirectory "$SMPROGRAMS\CivPBEMUploader"
CreateShortCut "$SMPROGRAMS\CivPBEMUploader\CivPBEMUploader.lnk" "$INSTDIR\CivPBEMUpload\CivPBEMUpload.exe"
CreateShortCut "$SMPROGRAMS\CivPBEMUploader\Open Configuration.lnk" "$INSTDIR\CivPBEMUpload\config.xml"
CreateShortcut  "$SMPROGRAMS\CivPBEMUploader\Uninstall.lnk" "$INSTDIR\Uninstall.exe"


WriteUninstaller $INSTDIR\Uninstall.exe

SectionEnd

Section "Uninstall"

SetShellVarContext all
Delete $INSTDIR\Uninstall.exe
RMDir /r $INSTDIR\CivPBEMUpload
RMDir $INSTDIR

Delete "$SMPROGRAMS\CivPBEMUploader\CivPBEMUploader.lnk" 
Delete "$SMPROGRAMS\CivPBEMUploader\Open Configuration.lnk" 
Delete "$SMPROGRAMS\CivPBEUploader\Uninstaller.lnk"
RMDir /r "$SMPROGRAMS\CivPBEMUploader"

SectionEnd 

